import {ADD, MINUS} from './constant';

export const addAction = data => ({type: ADD, data});
export const minusAction = data => ({type: MINUS, data});
export const asyncAction = (data, time) => {
  console.log(data, time);
  return (dispatch) => {
    setTimeout(() => {
      dispatch(addAction(data));
    }, time);
  }
}